import { createRouter, createWebHistory } from 'vue-router'
import BookList from '../components/BookList.vue'
import BookDetail from '../components/BookDetail.vue'
import AddBook from '../components/AddBook.vue'
import BorrowReturn from '../components/BorrowReturn.vue'

const routes = [
  { path: '/', component: BookList },
  { path: '/book/:id', component: BookDetail },
  { path: '/add', component: AddBook },
  { path: '/borrow-return', component: BorrowReturn }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router